  <!-- 二级路由编辑个人信息页面 -->
<template>
	<view>
		<global-navgation title="编辑个人信息"></global-navgation>
		<view class="edit-container">
			<view>
				<label for="name">姓名</label>
				<input type="text" v-model="name" value="" placeholder="请输入姓名" id="name" />
			</view>
			
			<view>
				<label for="phone">手机号</label>
				<input type="text" v-model="phone" value="" placeholder="请输入手机号" id="phone" />
				<view class="line"></view>
			</view>
			<view>
				<label for="wechat">微信号</label>
				<input type="text" v-model="wx" value="" placeholder="请输入微信" id="wechat" />
			</view>
			
			<view class="introduce">
				<label for="introduce">介绍</label>
				<textarea value="" v-model="introduce" placeholder="请输入您的介绍" id="introduce" />
			</view>
			
			
				<button type="default" @click="keep">保存</button>
			
			
		</view>
	</view>
</template>

<script>
	import globalNavgation from '../../../components/globalNavgation.vue'
	export default {
		components: {
			globalNavgation
		},
		data() {
			return {
				name:'',
				phone:'',
				wx:'',
				introduce:'',
				tokens:''
			}
		},
		onLoad(){
			uni.getStorage({
			    key: 'token',
			    success:  res=> {
					this.tokens=res.data
					console.log('mmm',this.tokens)
			    }
			});
		},
		// mounted() {
		// 	// 初始化获取数据
		// 	this.__initClassData()			
		// },
		methods: {		
			keep(){
				// if(!this.name||!this.phone||!this.wx||!this.introduce){
				// 	alert("不能为空")
				// 	return
				// }
				alert(123)
				// let data={
				// 	token:this.stokens,
				// 	name:this.info.nickName,
				// 	introduce:this.info.extend.introduce,
				// 	id:this.info.id
				// }
				this.$api.post({
					url: '/user/user/edit',
					data:{token:this.tokens,nickName:this.name,introduce:this.introduce,phone:this.phone,wechat_number:this.wx}
				}).then(res => {
									
						
						console.log('ggg',res)
					})
			}
		}
	}
</script>

<style scoped>
.edit-container{
	width: 100%;
	height: 1448rpx;
	background: rgb(247,247,247);
	overflow: hidden;
}

.edit-container view{
	width: 100%;
	height: 120rpx;
	background-color: #FFFFFF;
	font-family: PingFang SC;
	font-style: normal;
	font-weight: normal;
	font-size: 32rpx;
	color: rgba(0, 0, 0, 0.25);
	position: relative;
}

.edit-container view label{
	color: rgb(0, 0, 0);
	position: absolute;
	top: 38rpx;
	left: 32rpx;
}

.edit-container view input{
	height: 100%;
	width: 530rpx;
	position: absolute;
	top: 0rpx;
	left: 220rpx;
	color: rgb(0, 0, 0);
}

.edit-container view:first-child{
	margin-top: 38rpx;
}

.edit-container view:nth-child(2){
	margin-top: 20rpx;
}

.edit-container view.line {
		width: 718rpx;
		height: 2rpx;
		right: 0;
		bottom: 0;
		z-index: 1;
		background: rgba(0, 0, 0, 0.06);
		position: absolute;
	}

.edit-container .introduce{
	margin-top: 20rpx;
	width: 100%;
	height: 300rpx;
}

.edit-container .introduce textarea{
	height: 262rpx;
	width: 530rpx;
	position: absolute;
	top: 38rpx;
	left: 220rpx;
	color: rgb(0, 0, 0);
	text-align: justify;
}

.edit-container  button{
	margin-top: 60rpx;
	width:686rpx;
	height: 100rpx;
	text-align: center;
	line-height: 100rpx;
	font-family: PingFang SC;
	font-style: normal;
	font-weight: normal;
	font-size: 36rpx;
	color: #F7F7F7;
	background: linear-gradient(90deg, #3965FF 0%, rgba(57, 101, 255, 0.8) 100%);
	border-radius: 4px;
}
</style>